for (i = 0; i < nr_pages; i++)
page_array[i] = i;
-
+
/* VTI will not use memory between 3G~4G, so we just pass a legal pfn
to make QEMU map continuous virtual memory space */
- if (ram_size > MMIO_START) {
+ if (ram_size > MMIO_START) {
for (i = 0 ; i < (MEM_G >> XC_PAGE_SHIFT); i++)
page_array[(MMIO_START >> XC_PAGE_SHIFT) + i] =
(STORE_PAGE_START >> XC_PAGE_SHIFT);
}
+ /* skipping VGA hole, same as above */
+ if (ram_size > VGA_IO_START) {
+ for (i = 0 ; i < (VGA_IO_SIZE >> XC_PAGE_SHIFT); i++)
+ page_array[(VGA_IO_START >> XC_PAGE_SHIFT) + i] =
+ (STORE_PAGE_START >> XC_PAGE_SHIFT);
+ }
phys_ram_base = xc_map_foreign_batch(xc_handle, domid,
PROT_READ|PROT_WRITE,
* So to emulate right behavior that guest OS is assumed, we need to flush
* I/D cache here.
*/
-static void sync_icache(unsigned long address, int len)
+static void sync_icache(uint8_t *address, int len)
{
- int l;
+ unsigned long addr = (unsigned long)address;
+ unsigned long end = addr + len;
- for(l = 0; l < (len + 32); l += 32)
- __ia64_fc(address + l);
+ for (addr &= ~(32UL-1); addr < end; addr += 32UL)
+ __ia64_fc(addr);
ia64_sync_i();
ia64_srlz_i();